import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { WatchRecordIc } from './watchRecordIc.entity';

@Injectable()
export class WatchRecordIcService {
  constructor(
    @InjectRepository(WatchRecordIc)
    private watchRecordIcRepository: Repository<WatchRecordIc>,
  ) {}

  findAll(): Promise<WatchRecordIc[]> {
    return this.watchRecordIcRepository.find();
  }

  findOne(id: any): Promise<WatchRecordIc> {
    return this.watchRecordIcRepository.findOne(id);
  }

  async remove(id: number): Promise<void> {
    await this.watchRecordIcRepository.delete(id);
  }

  async create(cats: WatchRecordIc): Promise<void> {
    await this.watchRecordIcRepository.save(cats);
  }
}
